package com.parp;

import android.content.Context;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.util.Log;
import android.view.Display;
import android.view.View;
import android.widget.ImageView;

public class Background extends ImageView
{
	private final Context context;
	public Background(Context context) 
	{
		this(context,null);
	}
	public Background(Context context, AttributeSet attrs) {
		this(context, attrs,0);
	}
	public Background(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		this.context = context;
		
	}
	public void setBackground(float width, float height)
	{
		float ratio = height/width;
		if (ratio > 1.5f)
		{
			this.setBackgroundResource(R.drawable.background_wide);
		}
		else
		{
			this.setBackgroundResource(R.drawable.background);
		}
	}
}
